import Item from 'antd/lib/list/Item';
import * as React from 'react';
// import ArrowRight from './arrow-right.svg';
// import workletURL from '';
import './index.module.scss';
const { memo } = React;

interface TravelItemProps {
  isLoading?: boolean;
  currentIndex?: number;
  data: {
    title: string;
    from: string;
    date: string;
    imgSrc: string;
    index: number;
  };
}

function TravelItem(props: TravelItemProps) {
  const { data } = props;
  return (
    <div styleName="traveItem-box" className="fn18">
      <div styleName="sort-index">{data.index}</div>
      <div styleName="content">
        <div className="fn17 mgb10 mgr10" styleName="title">
          {data.title}
        </div>
        <div className="fn12 mgr20" styleName="gray">
          <span className="mgr10">{data.from}</span>
          {data.date}
        </div>
      </div>
      <div styleName="img-box">
        <img
          src={data.imgSrc}
          // src="https://images.pexels.com/photos/20787/pexels-photo.jpg?auto=compress&cs=tinysrgb&h=350"
          alt="加载图片错误"
        />
      </div>
    </div>
  );
}

export default memo(TravelItem);
